package com.example.tests;

import static org.hamcrest.Matchers.equalTo;
import static org.junit.Assert.assertThat;

public class ContactTestBase extends TestBase {

	public ContactTestBase() {
		super();
	}

	protected void modelCheck() {
		if(wantCheck()){
			if("yes".equals(app.getProperty("ceck.db"))){
				assertThat(app.getModel().getContacts(), 
						equalTo(app.getHibernateHelper().getContacts()));
			}
			
			if("yes".equals(app.getProperty("ceck.ui"))){
				assertThat(app.getModel().getContacts(), 
						equalTo(app.getContactHelper().getUIContacts()));
			}
		}
	}

}